home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Environments / Small Eiffel 0.4.8 / misc / INSTALL.BAT < prev    next >
DOS Batch File  |  1997-04-13  |  3KB  |  117 lines

  1. @echo off
  2.  
  3. rem C compiler:
  4. set CC=gcc
  5. set CCOBJ=gcc -c
  6.  
  7. rem C compiler options:
  8. set CC_OPTIONS=-ansi -O2
  9.  
  10. cls
  11. echo INSTALL SmallEiffel script for Windows NT/95
  12. echo.
  13.  
  14. if "%SmallEiffel%~"=="~" goto help_smalleiffel
  15. if not exist %SmallEiffel% goto help_exist
  16. cd /d %SmallEiffel%
  17. if errorlevel 1 goto help_cd
  18. if not exist bin mkdir bin
  19. if not exist bin goto help_mkdir_bin
  20.  
  21. cd bin
  22. echo "dummy" > dummy
  23. del /f /s /q .
  24.  
  25. cd ..\sys
  26. if exist system.se del /f /q system.se
  27. if exist system.se goto help_del_system
  28. echo Windows > system.se
  29. if exist loadpath.Windows del /f /q loadpath.Windows
  30. echo .\> loadpath.Windows
  31. echo %SmallEiffel%\lib_std\>> loadpath.Windows
  32. echo %SmallEiffel%\lib_rand\>> loadpath.Windows
  33. echo %SmallEiffel%\lib_show\>> loadpath.Windows
  34. echo %SmallEiffel%\lib_test\>> loadpath.Windows
  35. rem  Don't know how to avoid last CR with echo :-(
  36.  
  37. cd ..\bin_c
  38. echo C compiling clean ...
  39. if exist clean.exe del /f /q clean.exe
  40. %CC% %CC_OPTIONS% clean.c -o clean.exe
  41. if not exist clean.exe goto help_cc_clean
  42. echo C compiling finder ...
  43. if exist finder.exe del /f /q finder.exe
  44. %CC% %CC_OPTIONS% finder.c -o finder.exe
  45. if not exist finder.exe goto help_cc_finder 
  46. echo C compiling compile ...
  47. if exist compile.exe del /f /q compile.exe
  48. %CC% %CC_OPTIONS% compile.c -o compile.exe
  49. if not exist compile.exe goto help_cc_compile 
  50.  
  51. echo C compiling compile_to_c ...
  52. if exist compile_to_c.exe del /f /q compile_to_c.exe
  53. %CC% %CC_OPTIONS% compile_to_c.c -o compile_to_c.exe
  54. if exist compile_to_c.exe goto all_compiled
  55. REM do the version with splitted file
  56.  
  57. :all_compiled
  58. echo Files successfully compiled; moving them to bin directory
  59. del /f /q ..\bin\*.exe
  60. copy *.exe ..\bin
  61. del /f /q *.exe
  62.  
  63. cd ..\man
  64. ren *.hlp *.help
  65.  
  66. goto end_success
  67.  
  68. rem --------------------------------- help section 
  69. :help_smalleiffel
  70. echo You must set environment variable "SmallEiffel" to
  71. echo the directory in which you want to install SmallEiffel.
  72. goto end_failure
  73.  
  74. :help_exist
  75. echo Directory "%SmallEiffel%" does not exist.
  76. goto help_smalleiffel
  77. goto end_failure
  78.  
  79. :help_cd
  80. echo Cannot access directory "%SmallEiffel%".
  81. goto help_smalleiffel
  82. goto end_failure
  83.  
  84. :help_mkdir_bin
  85. echo Cannot create directory "%SmallEiffel%\bin".
  86. goto end_failure
  87.  
  88. :help_del_system
  89. echo Cannot remove file "%SmallEiffel%\sys\system.se".
  90. goto end_failure
  91.  
  92. :help_cc_clean
  93. echo Unable to C compile clean.c to clean.exe.
  94. echo C compiler: %CC%  Options: %CC_OPTIONS%
  95. goto end_failure
  96.  
  97. :help_cc_finder
  98. echo Unable to C compile finder.c to finder.exe.
  99. echo C compiler: %CC%  Options: %CC_OPTIONS%
  100. goto end_failure
  101.  
  102. :help_cc_compile
  103. echo Unable to C compile compile.c to compile.exe.
  104. echo C compiler: %CC%  Options: %CC_OPTIONS%
  105. goto end_failure
  106.  
  107. :end_success
  108. cd /d %SmallEiffel%
  109. echo SmallEiffel Install succeeded.
  110. goto end
  111.  
  112. :end_failure
  113. echo SmallEiffel Install failed.
  114. goto end
  115.  
  116. :end
  117. pause